/*
 */
package com.compomics.ms1_intensitiesretrieval;

/**
 * Class that describes all the SpectrumVariables that need to be taken into
 * account
 *
 * @author Jonas
 */
public class MSLimsHits {

    // First 3 variables coming directly from the ms_lims query
    private double precursorMZ;                
    private double retentionTime;                
    private double totalMS2SpectrumInt;     
    
    // These variables are set after parsing the featureXMLfile
    private double startPoint = -1.0;
    private double endPoint = -1.0;
    private double openMSintensity;
    // These variables are set after going through the peakpicked mzmlFile
    private double highestPeak = 0.0;
    private double sumOfPeaks = 0.0;

    // Constructor to set the MSLims parameters
    public MSLimsHits(double precursor, double rtSec, double totalMS2SpectrumInt) {
        this.precursorMZ = precursor;
        this.retentionTime = rtSec;
        this.totalMS2SpectrumInt = totalMS2SpectrumInt;
    }

    // Getters and setters
    public double getPrecursorMZ() {
        return precursorMZ;
    }

    public void setPrecursorMZ(double precursorMZ) {
        this.precursorMZ = precursorMZ;
    }

    public double getRetentionTime() {
        return retentionTime;
    }

    public void setRetentionTime(double rtSec) {
        this.retentionTime = rtSec;
    }

    public double getTotalMS2SpectrumInt() {
        return totalMS2SpectrumInt;
    }

    public void setTotalMS2SpectrumInt(double totalMS2SpectrumInt) {
        this.totalMS2SpectrumInt = totalMS2SpectrumInt;
    }

    public double getStartPoint() {
        return startPoint;
    }

    public void setStartPoint(double startPoint) {
        this.startPoint = startPoint;
    }

    public double getEndPoint() {
        return endPoint;
    }

    public void setEndPoint(double endPoint) {
        this.endPoint = endPoint;
    }

    public double getOpenMSintensity() {
        return openMSintensity;
    }

    public void setOpenMSintensity(double openMSintensity) {
        this.openMSintensity = openMSintensity;
    }

    public double getHighestPeak() {
        return highestPeak;
    }

    public void setHighestPeak(double highestPeak) {
        this.highestPeak = highestPeak;
    }

    public double getSumOfPeaks() {
        return sumOfPeaks;
    }

    public void setSumOfPeaks(double sumOfPeaks) {
        this.sumOfPeaks = sumOfPeaks;
    }
    
    public void increaseSumOfPeaks(double valueToAdd){
        sumOfPeaks += valueToAdd;
    }
    
    // Override the toString method from the java object class
    @Override
    public String toString() {
        return precursorMZ + "\t" + retentionTime + "\t" + totalMS2SpectrumInt + "\t" + startPoint + "\t" + endPoint + "\t"
                + openMSintensity + "\t" + highestPeak + "\t" + sumOfPeaks;
    }
}
